FROM node:16-alpine

RUN mkdir -p /app
ADD class_course_backend /app
WORKDIR /app

RUN npm set registry https://registry.npmmirror.com
RUN npm install
RUN npm i pm2 -g


EXPOSE 8081
CMD [ "pm2-runtime", "start", "ecosystem.config.js" ]